REM /* **********************************************************
REM *  Command File for Running Batch Operation
REM *  Name: openxplore-batch.cmd
REM *  Author: www.pecats.com
REM *  Date: Sep 15, 2008
REM ************************************************************/

@echo off

if "%OS%" == "Windows_NT" setlocal

set CURRENT_DIR=%cd%
if not "%OPENXPLORE_HOME%" == "" goto gotHome
set OPENXPLORE_HOME=%CURRENT_DIR%
if exist "%OPENXPLORE_HOME%\batch.cmd" goto okHome
cd ..
set OPENXPLORE_HOME=%cd%
cd %CURRENT_DIR%

:gotHome
if exist "%OPENXPLORE_HOME%\batch.cmd" goto okHome
echo The OPENXPLORE_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end

:okHome
%OPENXPLORE_HOME%\batch.cmd

:end